'\" t
.\"     Title: gogui-statistics
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 03/25/2011
.\"    Manual: GoGui Reference
.\"    Source: GoGui 1.3.0
.\"  Language: English
.\"
.TH "GOGUI\-STATISTICS" "1" "03/25/2011" "GoGui 1\&.3\&.0" "GoGui Reference"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gogui-statistics \- Runs GTP commands on all positions of game collections\&.
.SH "SYNOPSIS"
.HP \w'\fBgogui\-statistics\fR\ 'u
\fBgogui\-statistics\fR [\fB\-backward\fR] [\fB\-begin\fR\ \fIcommands\fR] [\fB\-config\fR\ \fIfile\fR] [\fB\-commands\fR\ \fIcommands\fR] [\fB\-final\fR\ \fIcommands\fR] [\fB\-force\fR] [\fB\-min\fR\ \fIn\fR] [\fB\-max\fR\ \fIn\fR] [\fB\-program\fR\ \fIprogram\fR] [\fB\-quiet\fR] [\fB\-random\fR] [\fB\-setup\fR\ \fIn\fR] [\fB\-size\fR\ \fIn\fR] [\fB\-verbose\fR] \fIfile\&.sgf\fR...
.HP \w'\fBgogui\-statistics\fR\ 'u
\fBgogui\-statistics\fR \fB\-help\fR
.HP \w'\fBgogui\-statistics\fR\ 'u
\fBgogui\-statistics\fR \fB\-version\fR
.HP \w'\fBgogui\-statistics\fR\ 'u
\fBgogui\-statistics\fR \fB\-analyze\fR\ \fIfile\fR [\fB\-config\fR\ \fIfile\fR] [\fB\-output\fR\ \fIfile\fR] [\fB\-precision\fR\ \fIn\fR]
.SH "DESCRIPTION"
.PP
gogui\-statistics runs a a set of commands for a Go program supporting the Go Text Protocol on each position of Go game collections\&. The results are stored in the text file "gtpstatistics\&.dat" in table format\&. If gogui\-statistics is run with the option
\fB\-analyze\fR, a HTML file is produced from the file statistics\&.dat\&. The HTML file contains summary statistics for this file\&.
.PP
All GTP commands that return a single number can be used with gogui\-statistics\&. For the following standard and commonly used commands, an automatic conversion of the result to a number is done:
.PP
\fBcputime\fR
.RS 4
The result is the difference to the last invocation of cputime\&.
.RE
.PP
\fBestimate_score\fR
.RS 4
The result is parsed for a score string as the first word (like GNU Go\*(Aqs response) The score string is converted into a score number, Black counting positive, White negative\&.
.RE
.PP
\fBfinal_score\fR
.RS 4
The result is parsed for a score string\&. The score string is converted into a score number, Black counting positive, White negative\&.
.RE
.PP
\fBreg_genmove\fR
.RS 4
The color of the move in the game is appended\&. The result is "1", if the result is the same move as played in the game, "0" otherwise\&.
.RE
.SH "OPTIONS"
.PP
\fB\-analyze\fR \fIfile\fR
.RS 4
Analyze the result table
\fIfile\&.dat\fR\&. Creates a HTML report files\&. The files will be placed in the same directory as
\fIfile\&.dat\fR
and use
\fIfile\fR
as a filename prefix\&.
.RE
.PP
\fB\-backward\fR
.RS 4
Iterate backward over positions, starting with end position as number one\&.
.RE
.PP
\fB\-config\fR \fIfile\fR
.RS 4
Read command line options and arguments from the given file\&.
.RE
.PP
\fB\-commands\fR \fIcommands\fR
.RS 4
Comma separated list of GTP commands to run on each position (before each move)\&.
.RE
.PP
\fB\-final\fR \fIcommands\fR
.RS 4
Comma separated list of GTP commands to run only on final positions (after the last move)\&.
.RE
.PP
\fB\-force\fR
.RS 4
Overwrite existing result table\&.
.RE
.PP
\fB\-help\fR
.RS 4
Display help and exit\&.
.RE
.PP
\fB\-max\fR
.RS 4
Only run commands on positions at less or equal this move number\&.
.RE
.PP
\fB\-min\fR
.RS 4
Only run commands on positions at greater or equal this move number\&.
.RE
.PP
\fB\-output\fR \fIfile\fR
.RS 4
Filename for result table\&. Default is
statistics\&.dat\&. If option
\fB\-analyze\fR
is used, the output is a directory or directory and file name prefix for the generated report files\&.
.RE
.PP
\fB\-precision\fR \fIn\fR
.RS 4
Maximum number of fraction digits for floating point numbers in the output file\&.
.RE
.PP
\fB\-program\fR \fIcommand\fR
.RS 4
Command line for running Go program\&.
.RE
.PP
\fB\-quiet\fR
.RS 4
Don\*(Aqt write information about progress to standard error stream\&.
.RE
.PP
\fB\-random\fR
.RS 4
Only select one random position per game\&.
.RE
.PP
\fB\-setup\fR
.RS 4
Allow setup stones in the root position\&.
.RE
.PP
\fB\-size\fR \fIn\fR
.RS 4
Board size allowed for games (default 19)\&.
.RE
.PP
\fB\-verbose\fR
.RS 4
Print the GTP stream to the Go program to standard error\&.
.RE
.PP
\fB\-version\fR
.RS 4
Print version and exit\&.
.RE
.SH "EXAMPLES"
.SS "Run gogui\-statistics"
.PP

.sp
.if n \{\
.RS 4
.\}
.nf
\fB
gogui\-statistics \-program "gnugo \-\-mode gtp" \e
  \-commands "reg_genmove,estimate_score,cputime" \e
  \-final "final_score" \e
  regression/games/olympiad2004/19x19/*\&.sgf
\fR
.fi
.if n \{\
.RE
.\}
.sp
.SS "Generate HTML Reports"
.PP

.sp
.if n \{\
.RS 4
.\}
.nf
\fB
gogui\-statistics \-analyze statistics\&.dat \-output statistics/olympiad2004
\fR
.fi
.if n \{\
.RE
.\}
.PP


